package com.cpimex.eprice.usuarios;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.*;

public class GerenteRegional extends Usuario{
    public GerenteRegional() {
    }

    public ArrayList listado(Connection conn, String str_query2, Map map_where, int int_ordenar, boolean bol_orderAsc) throws SQLException, Exception {
        ArrayList arr_result = null;
        
        String str_query = super.str_query;
        str_query += " where 1 = 1 ";

        String str_ejecutivo = map_where.get("str_ejecutivo")==null || map_where.get("str_ejecutivo").equals("") ?"":((String) map_where.get("str_ejecutivo"));
        String str_coord     = map_where.get("str_coord")==null || map_where.get("str_coord").equals("") ?"":((String) map_where.get("str_coord"));
        String str_gerente   = map_where.get("str_gerente")==null || map_where.get("str_gerente").equals("") ?"":((String) map_where.get("str_gerente"));

        str_query +=
                (str_ejecutivo.equals("")?"":" AND " + " codigoVen_sol = '" + str_ejecutivo + "' ") +
                (str_coord.equals("")    ?"":" AND " + " coordinadoraCli_sol = '" + str_coord + "' ") +
                (str_gerente.equals("")  ?"":" AND " + " claseProducto_sol = '" + str_gerente + "' ");


        arr_result = super.listado(conn, str_query, map_where, int_ordenar, bol_orderAsc);

        return arr_result;
    }
}
